/* 指定抛出异常（C++17不支持） */
#include <iostream>

using namespace std;

void fun01(void) //throw ()
{
    //throw 10;

    throw 3.14;

    return;
}

// 03_code.cpp:16:18: error: 
// ISO C++17 does not allow dynamic exception specifications
#if 0
void fun02(void) throw (int, float)
{
    throw 10;

    return;
}
#endif
#if 0
/* 已放弃 (核心已转储) */
void fun03(void) throw ()
{
    throw 10;

    return;
}
#endif

int main(int argc, char **argv)
{

    try 
    {
        fun01();
    }
    catch (...)
    {
        cout << "捕获所有异常" << endl;
    }
    return 0;
}